package thread;

public class ThreadDemo3 {
    public static void main(String[] args) {
        Thread t1=new Thread(){
            public void run(){
                for (int i = 0; i < 100; i++) {
                    System.out.println("今天天气好晴朗，");
                }
            }
        };
        t1.start();


        //Runnable r2=new Runnable(){
        //    @Override
        //    public void run() {
        //        System.out.println("处处好风光。");
        //    }
        //};
        //Thread t2=new Thread(r2);

        Thread t2=new Thread(()-> {
            System.out.println("处处好风光。");
        });


        t2.start();




    }
}